{% extends "base.html" %}

{% block title %}Upload PDF{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-8">
        <div class="card">
            <div class="card-header">
                <h1 class="h3 mb-0">Upload PDF File</h1>
            </div>
            <div class="card-body">
                <form action="" method="post" enctype="multipart/form-data" novalidate>
                    {{ form.hidden_tag() }}
                    <div class="mb-3">
                        {{ form.file.label(class="form-label") }}
                        {{ form.file(class="form-control") }}
                        {% for error in form.file.errors %}
                        <span class="text-danger">{{ error }}</span>
                        {% endfor %}
                        <div class="form-text">Only PDF files are allowed. Maximum file size: 16MB</div>
                    </div>
                    <div class="mb-3">
                        {{ form.tags.label(class="form-label") }}
                        {{ form.tags(class="form-control") }}
                        {% for error in form.tags.errors %}
                        <span class="text-danger">{{ error }}</span>
                        {% endfor %}
                        <div class="form-text">Enter tags separated by commas (e.g., report, finance, 2023)</div>
                    </div>
                    <div class="d-grid">
                        {{ form.submit(class="btn btn-primary") }}
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}
